/*
 * NeighListSpec.hpp
 *
 *  Created on: Aug 9, 2011
 *      Author: marchi
 */

#ifndef NEIGHLISTSPEC_HPP_
#define NEIGHLISTSPEC_HPP_
template<>
inline void NeighList<Sortable>::push_front(const float & f, const int & o){
		Sortable tmp2={o,f};
		neigh.push_front(tmp2);
}
template<>
inline void NeighList<NonSortable>::push_front(const int & o){
		NonSortable tmp2={o};
		neigh.push_front(tmp2);
}


template<>
inline void NeighList<Sortable>::push_back(const float & f, const int & o){
		Sortable tmp2={o,f};
		neigh.push_back(tmp2);
}
template<>
inline void NeighList<NonSortable>::push_back(const int & o){
		NonSortable tmp2={o};
		neigh.push_back(tmp2);
}
template<>
inline bool NeighList<Sortable>::compare(Sortable & x, Sortable & y){
	return x.dist<y.dist;
}

template<>
inline void NeighList<Sortable>::sort(){
	neigh.sort(compare);
}

template<>
inline void NeighList<NonSortable>::sort(){}

#endif /* NEIGHLISTSPEC_HPP_ */
